import http from './interface'

// 添加/修改收货地址
export const addAddress = (data) => {
    return http.request({
        url: 'order/api/addAddress',
        method: 'POST', 
        data
    })
}
// 查询收货地址
export const getAddress = (data) => {
    return http.request({
        url: 'order/api/getAddress',
        method: 'GET', 
        data
    })
}
// 删除收货地址
export const deleteAddress = (data) => {
    return http.request({
        url: 'order/api/deleteAddress',
        method: 'POST', 
        data
    })
}
// 查询默认收货地址
export const getDefault = (data) => {
    return http.request({
        url: 'order/api/getIs_default',
        method: 'GET', 
        data
    })
}
// 新增订单
export const subOrder = (data) => {
    return http.request({
        url: 'order/api/addOrder',
        method: 'POST', 
        data
    })
}
// 查询订单
export const getOrder = (data) => {
    return http.request({
        url: 'order/api/getOrder',
        method: 'POST', 
        data
    })
}
// 查询订单详情/金额
export const getOrderDetail = (data) => {
    return http.request({
        url: 'order/api/getOrderDetail',
        method: 'POST', 
        data
    })
}
// 删除订单
export const deleteOrder = (data) => {
    return http.request({
        url: 'order/api/deleteOrder',
        method: 'POST', 
        data
    })
}
// 默认全部导出  import api from '@/common/vmeitime-http/'
export default {
	addAddress,
	getAddress,
	deleteAddress,
	getDefault,
	subOrder,
	getOrder,
	getOrderDetail,
	deleteOrder
}